package cn.kgc.service.impl;

import cn.kgc.bean.pojo.EqHazardDevice;
import cn.kgc.mapper.EqHazardDeviceMapper;
import cn.kgc.service.EqHazardDeviceService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @projectName: safetyMag
 * @package: cn.kgc.service.impl
 * @className: EqHazardDeviceServiceImpl
 * @author: yindexin
 * @description: TODO
 * @date: 2023/5/2 0:52
 * @version: 1.0
 */
@Service("eqHazardDeviceService")
public class EqHazardDeviceServiceImpl implements EqHazardDeviceService {
    @Resource
    private EqHazardDeviceMapper eqHazardDeviceMapper;
    @Override
    public List<EqHazardDevice> getEqHazardDeviceAll() {
        return eqHazardDeviceMapper.getEqHazardDeviceAll();
    }

    @Override
    public boolean addEqHazardDeviceAll(EqHazardDevice eqHazardDevice) {
        int count = eqHazardDeviceMapper.addEqHazardDeviceAll(eqHazardDevice);
        if (count > 0) {
            return true;
        }
        return false;
    }

    @Override
    public boolean deletEqHazardDeviceAllById(Integer id) {
        int count = eqHazardDeviceMapper.deletEqHazardDeviceAllById(id);
        if (count > 0) {
            return true;
        }
        return false;
    }

    @Override
    public boolean UpdateEqHazardDeviceAll(EqHazardDevice eqHazardDevice) {
        int count = eqHazardDeviceMapper.UpdateEqHazardDeviceAll(eqHazardDevice);
        if (count > 0) {
            return true;
        }
        return false;
    }
}
